import request from '@/utils/request'

export function addUserGroup(params) {
    return request({
        url: '/group/personGroup',
        method: 'post',
        data: params
    })
}

export function queryUserGroup(params) {
    return request({
        url: '/group/personGroup/list',
        method: 'get',
        params,
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    })
}

export function delUserGroup(params) {
    return request({
        url: '/group/personGroup',
        method: 'delete',
        params,
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    })
}

export function getUserNewXh() {
    return request({
        url: '/group/personGroup/getNewXh',
        method: 'get'
    })
}

export function getOrgNewXh() {
    return request({
        url: '/group/organizationGroup/getNewXh',
        method: 'get'
    })
}

export function addOrgGroup(params) {
    return request({
        url: '/group/organizationGroup',
        method: 'post',
        data: params
    })
}

export function queryOrgGroup(params) {
    return request({
        url: '/group/organizationGroup/list',
        method: 'get',
        params,
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    })
}

export function delOrgGroup(params) {
    return request({
        url: '/group/organizationGroup',
        method: 'delete',
        params,
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    })
}


export function getOrgTree(params) {
    return request({
        url: '/system/org/treeselect',
        method: 'get',
        params,
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    })
}


export function getUser(params) {
    return request({
        url: '/system/person/list',
        method: 'get',
        params,
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
    })
}